changePlan = function(){
	
	var oldV1;
	var oldV2;
	/*//主题
    var Title = new Ext.form.TextField({
    	id:'title',
        width: 20,
        allowBlank: false,
        maxLength:100,
        name: 'username',
        fieldLabel: '标题',
        blankText: '请输入标题',
        maxLengthText: '姓名不能超过100个字符'
    });*/
	var state = {
			width: 500,
			xtype: 'displayfield',
			id: 'state',
			hidden:true,
			fieldLabel: 'state'	
	};
	var lpId = {
			width: 500,
			xtype: 'displayfield',
			id: 'lpId',
			hidden:true,
			fieldLabel: 'id'	
	};
	var studentId = {
			width: 500,
			xtype: 'displayfield',
			id: 'studentId',
			hidden:true,
			fieldLabel: 'studentId'	
	};
	//备注
	var remark ={
			width: 500,
			xtype: 'textareafield',
			id: 'remark',
			rows:2,
			fieldLabel: '备注'	
		}
  
    //规划内容
    var content = {
    	id:'content_text',
        fieldLabel: '规划内容',
        xtype: 'xhtmleditor',
      //  width: 20,
        height: 300,
        allowBlank: false,
        uploadConfig:{
            url:"uploadPhotoByTypeAction.action?PicType=studentPlan"
        },
        blankText: '请输入规划内容！'
    };
    //导师评语
    var evaluate = {
			width: 500,
			xtype: 'displayfield',
			id: 'evaluate',
			rows:3,
			fieldLabel: '导师评语'	
	};
    //创建时间
    var createDate = {
			//width: 500,
			xtype: 'displayfield',
			id: 'createDate',
			
			fieldLabel: '创建时间'	
	};
  //创建时间
    var endDate = {
			//width: 500,
			xtype: 'displayfield',
			id: 'endDate',
			hidden:true,
			fieldLabel: '最后时间'	
	};
    //修改时间
    var doneDate = {
			//width: 500,
			xtype: 'displayfield',
			id: 'doneDate',
			
			fieldLabel: '修改时间'	
	};
	var panel = new Ext.form.FormPanel( {
		id : "summaryPanel",
		layout : "form",
		items:[  
			{
				xtype:'label',
				html:'<center><div style="font-size:15px;"><b>人生规划书</b></div></center>'
			},
			createDate,
			doneDate,endDate,
	       content,
	       remark,
	       evaluate,
	       state,
	       lpId
	    ], 
	    buttons : [ {
			xtype : "button",
			id:'saveBtn',
			text : "保存",
			pressed : false,
			handler : validatorData
		}],
		buttonAlign : "center"

	});
	Ext.Ajax.request( {
    	url : "qryLifePlanByParameterAction.action", 
    	params : {
    		
    	}, //参数
    	success : function(response, option) {
    		
    		var obj = Ext.decode(response.responseText);
    		if(obj.list.length > 0){
    			Ext.getCmp("state").setValue(obj.list[0].state);
        		Ext.getCmp("lpId").setValue(obj.list[0].id);
        	//	Ext.getCmp("studentId").setValue(obj.list[0].studentId);
        		Ext.getCmp("remark").setValue(obj.list[0].remark);
        		Ext.getCmp("content_text").setValue(obj.list[0].conentText);
        		Ext.getCmp("evaluate").setValue(obj.list[0].evaluate);
        		Ext.getCmp("createDate").setValue(obj.list[0].createDate==null?"":obj.list[0].createDate.replace("T"," "));
        		Ext.getCmp("doneDate").setValue(obj.list[0].doneDate==null?"":obj.list[0].doneDate.replace("T"," "));
        		Ext.getCmp("endDate").setValue(obj.list[0].modifyDateLimit==null?"":obj.list[0].modifyDateLimit.replace("T"," "));
        		oldV1 = Ext.getCmp("remark").getValue();
        		oldV2 = Ext.getCmp("content_text").getValue();
    		}
    		if(comptime(Ext.getCmp('endDate').getValue(),getNowFormatDate()) == false){
    			Ext.Msg.alert("提示", '更改时间已过，不能继续修改！');
    			
    			Ext.getCmp("summaryPanel").disable();
    			//Ext.getCmp("remark").disable();
    		}
    		
    	},
    	failure : function(response, option) {
    		Ext.Msg.alert("失败", "系统错误");
    	}
    	});
	
	function validatorData() {
		//var myDate = new Date().format("yyyy-MM-dd hh:mm:ss"); 
	/*	alert(Ext.getCmp('endDate').getValue()+"^^^"+getNowFormatDate());
		alert(comptime(Ext.getCmp('endDate').getValue(),getNowFormatDate()));
		*/
		/*if(!comptime(Ext.getCmp('endDate').getValue(),getNowFormatDate())){
			
		}*/
		
		
		var remark = Ext.getCmp('remark').getValue();
		//var title = Ext.getCmp('title').getValue();
		var conentText = Ext.getCmp('content_text').getValue();
		if(oldV1 == remark && oldV2 == conentText){
			Ext.Msg.alert("提示", '没有修改的内容，无需保存！');
			return ;
		}
		var lpId = Ext.getCmp('lpId').getValue();
		var url = 'updateLifePlanByParamAction.action';
		if(lpId == null || lpId==''){
			url = 'addLifePlanAction.action';
		}
		//alert("kk");
		if(panel.getForm().isValid()){
			panel.getForm().submit({
				waitTitle : '提示',//标题
				waitMsg : '正在提交数据请稍后...',//提示信息
				url : url,
				method : 'post',
				params : {
					id:lpId,
					remark : remark,
					conentText:conentText
				}, //参数
				success : function(form, action) {
					var flag=action.result;
					if (flag.success == true) {
						Ext.Msg.alert("提示", "保存成功！");
						//panel.getForm().reset();
					} else {
						Ext.Msg.alert("提示", "保存失败！");
					}
				},
				failure : function(form,action) {   
					if(action.result.success){
						Ext.Msg.alert("提示", "保存成功！");
					}else{
					Ext.Msg.alert("提示","保存失败！");
					}
				}
			});
		}
		else{
			Ext.Msg.alert("提示","请完善信息！");
		}
	}
 
	return panel;
	
}